package dto

import (
	"service/app/mode"
)

type ApmAddDto struct {
	PowerPrice float64 `json:"power_price" form:"water_price"  binding:"omitempty" required_msg:"water_price 参数为数字"`
	WaterPrice float64 `json:"water_price" form:"power_price"  binding:"omitempty" required_msg:"power_price 参数为数字"`
	Des        string  `json:"desc" form:"room_id" binding:"omitempty" validate:"max=20" required_msg:"desc 长度不可超200字符"`
	Room       int     `json:"room_id" form:"room_id" binding:"required" required_msg:" room_id 为必填项目" `
}
type ApmEditDto struct {
	PowerPrice float64 `json:"power_price" form:"power_price"  binding:"required" required_msg:"power_price 为必填项目,参数为数字"`
	WaterPrice float64 `json:"water_price" form:"water_price"  binding:"required" required_msg:"water_price 为必填项目,参数为数字"`
	Des        string  `json:"desc" form:"room_id" binding:"omitempty" validate:"max=20" required_msg:"desc 长度不可超200字符"`
	Room       int     `json:"room_id" form:"room_id" binding:"required" required_msg:" room_id 为必填项目" `
}

func (m *ApmEditDto) ConverApmDb(obj *mode.Db_apm) {
	obj.PowerPrice = m.PowerPrice
	obj.WaterPrice = m.WaterPrice
	obj.Des = m.Des
	obj.Room = m.Room
}
